home *** CD-ROM | disk | FTP | other *** search
- ***** ******* **** * ** * **** *****
- * * * * * * * * * *
- **** * **** * * * * * *** ****
- * * * * * * * * * * *
- ***** * * * * * ** ***** *****
-
- -----------------------------------------------------
- Release 1.1
-
- Written by:
- Anders Lindgren
-
- Extract character strings
- from (all type of) files.
- -----------------------------------------------------
-
- This program may be freely distributed, but no warranty
- is given!
-
-
- You can include this program in any commercial product,
- but if you do so, I would appreciate a registrated copy.
-
- If you think this utility is useful, please send me a
- postcard telling me so. Please also write to me if you
- have any suggestions, questions or if you like to give
- me a $ or two. (I'm just a poor soldier doing my duty
- for my country).
-
- Address:Anders Lindgren
- Mälarblick 8
- S-161 51 Bromma
- Sweden
-
- BBS: SUGA, +46 (0)8 348523
- +46 (0)8 343276
- (Log on, Write "Brev Anders Lindgren", to write
- a letter to me).
-
- UseNet: d91ali@csd.uu.se
-
-
- -----------------------------------------------------
-
- Swedish User Group of Amiga is a non-profit nation
- wide club for Amiga-freaks in sweden. It has been
- operating for many years (I joined in around -87, and
- have been more or less active ever since.) A newspaper
- with 16 to 20 pages is beeing distrubuted quaterly. A BBS
- is runed using the command line program NiKom, which
- is written by a member of the club. (Too bad for you
- non swedish speaking people that it isn't translated
- yet.) For the members in Stockholm we have a meeting
- every sunday between 11am and 3pm.
-
- Join by inserting only 150:- (less than $20) into the
- PostGiro account 13 43 32-2. You can also just show up
- at the "Verksta'n" to see what it's all about!
-
- Address: SUGA
- Disponentvillan, Verkstan
- Norrtullsgatan 12k
- S-113 27 Stockholm
-
- -----------------------------------------------------
-
- 0 INSTALLATION
- I OVERVIEW
- II USAGE
- III OPTIONS
- IV EXAMPLE
- V REVISIONS
-
-
- 0
- INSTALLATION
-
- This is a very simple operation to anyone who has the least knowledge
- of CLI or Shell. Just copy the file "strings" to your C: directory, or
- to anywhere else in your path.
-
- I also recomend you, if you hasn't got one already, to create a
- directory called "man" or "doc" and collect all your documentation
- files there.
-
-
- I
- OVERVIEW
-
- Strings is a short utility program written to find character strings
- in any type of file, typically an executable. It will read the file,
- searching for all strings. If one is found, it is printed out.
-
- Strings can be used to see which messages a program can print out, or
- to find which libraries it requiers. The program can also be used as a
- "filter" to strip out unwanted control character. Its use is only
- limited to Your imagination.
-
- The program is fairly short, only about 3 Kb. It "stands on its own
- legs", i.e. it doesn't use any external libraries or resources.
-
- No Workbench icon exists because you have no use for it from the wb.
-
- For you technicans out there; Strings is written in C, using the
- SAS C compiler.
-
-
- II
- USAGE
-
- To use the program type:
- strings [-e] [-nX] [-o outfile] [-b] [infile]
- or:strings -u|-?
-
- If a "infile" is given, Strings will read from it, otherwise it will
- read from the standard input. (normally the keyboard). If the -o
- switch exists the output will be written to a separate output file,
- otherwist the output will be printed to the standard output (normally
- the screen).
-
- This means that Strings can simply be made part of a pipeline, for
- those blessed with shells which are capable if it. (That means almost
- every shell on the market, excpet Commodores own. I personally
- recomend you to buy William S. Hawes' WShell.)
-
- If "infile" is present on the command line, it must be the last
- argument.
-
- A "string" is a series of printable characters. Leading spaces
- is not considered part of a string.
-
- The program can be terminated by pressing ctrl-C, or by executing
- a "Break" command from another CLI/Shell.
-
- Problems: Due to the difficulties to decide what is a string
- and what is just random characters, some lines of garbage can
- be printed. You, the user, can influense this by using the -e and
- -n switches appropriate (See the next section).
-
-
-
- III
- OPTIONS
-
- -e : Print out strings which contains characters from the
- extended character set. (That means characters from
- 160 to 255). By default this switch is disabled. If the
- switch is present, the extended characterset is used.
- (Why? Well, in Sweden and many other europeean contries,
- the characters in the "upper half" is used often, for
- example "åäö" is part of the swedish alphabet. All the
- special Amiga characters, like © ° ® is included there
- etc.)
-
- -nX : Set the length of the shortest string to print. By default
- the value of X is six.
-
- -o name : Write the output to file "name" instead of to the standard
- output.
-
- -b : Write the position of the string, in hexadecimal bytes, in
- front of the string.
-
- -u or -?: Print out a simple help text.
-
- The switched -e and -b toggles from disabled to enabled, and vice
- versa. If two switches of the same type, "strings -e -e", exists on
- the command line, they take eachother out. If several -n switches
- exist the last one rules.
-
- To "force" -e or -b into disabled or enabled mode, write -e0 or -e1
- respecively.
-
- This means that You can create an alias with other defaults than the
- ones I have choosed, without loosing any flexibility. (Se section
- EXAMPLE).
-
- IV
- EXAMPLE
-
- 1> strings c:sort
- FROM/A,TO/A,COLSTART/K
- Bad args
- ...
- The result is that some lines of text, containing the command "sort"s
- messages, will scroll by.
-
-
- 1> strings -b c:sort
- 069D:FROM/A,TO/A,COLSTART/K
- 06B5:Bad args
- ...
- The -b switch enables the byteoffset, "069D:" etc., to be printed.
-
-
- > strings -e c:sort
- Iúÿî(lÿü/
- p$AÕÊÕÊ.
- ...
- FROM/A,TO/A,COLSTART/K
- Bad args
- ...
- The -e switch adds all high byte characters to its list of printable
- characters, so some lines containing garbage will be printed.
- Fortunately all true strings containing the extended character set
- will be printed.
-
-
- 1> strings -n1 -e -oallan.ok allan.txt
- This line will act as a simple control-code stripper, since it will
- let all printable characters through. (Note the -n1, which means that
- the shortest string treshhold is one character).
-
-
- 1> alias strings "strings -e -b -n10"
- This alias works on WShell (it may differ a little on other shells).
- It makes strings use the extended character set by default, it prints
- out the byteoffset, and the shortest line it prints is 10 characters
- long.
- Note, that you can still use the switches to disable the options and
- to set a new -n value.
-
-
- V
- RELEASES
-
- Release 1: 28-dec-90
- Containing V1.0 binary and doc.
- (No Source, since the clop() (Command Line Option Parser)
- routine in ALiLib isn't fixed yet).
-
- XX-xxx-XX
- Leading spaces not considered part of the string.
-
- Release 1.1: 17-Sep-93
- Well, what the heck, I just recompiled the program using
- SAS/C 6.3, and released it.
- A sequence of characters is now considered a string if it
- is terminated by a 0, a newline, a carriage return or a tab.
- (I'm not sure I fixed this before or after R1, but here it is.)
- The source is distributed, but remember that I wrote it
- wears ago.
-